<template>
  <div style="width: 100px; height: 100px;" :style="styleObj">test</div>
</template>

<script setup>
  import { ref } from 'vue';
  const styleObj = ref({
    color:'pink',
    backgroundColor:'red'
  })
</script>

<style>

</style>